import VueRouter from 'vue-router'
//导进组件
import homeContainer from './components/tabbar/homeContainer.vue'
import memberContainer from './components/tabbar/memberContainer.vue'
import shopcarContainer from './components/tabbar/shopcarContainer.vue'
import searchContainer from './components/tabbar/searchContainer.vue'
import newsList from './components/news/newsList.vue'
import newsInfo from './components/news/newsInfo.vue'
import photoList from './components/photos/photoList.vue'
import goodsList from './components/goods/goodsList.vue'
import goodsInfo from './components/goods/goodsInfo.vue'


let router = new VueRouter({
	routes: [
	    { path: '/', redirect: '/home' },
	    { path: '/home', component: homeContainer },
		{ path: '/member', component: memberContainer },
		{ path: '/shopcar', component: shopcarContainer },
		{ path: '/search', component: searchContainer },
		{ path: '/home/newsList', component:newsList },
		{ path: '/home/newsList/newsInfo/:id', component:newsInfo },
		{ path:'/home/photoList',component:photoList},
		{ path:'/home/goodsList',component:goodsList},
		{path:'/home/goodsInfo/:id',component:goodsInfo,name:'goodsInfo'},
	],
	linkActiveClass: 'mui-active' //覆盖掉路由默认高亮的类，router-link-active
})

export default router